desc "Load fixtures data into the test database"
task :load_fixtures_to_development => :environment do
  require 'active_record/fixtures'
  ActiveRecord::Base.establish_connection(:development)
  Dir.glob(File.join(RAILS_ROOT, 'test', 'fixtures', '*.{yml,csv}')).each do |fixture_file|
    Fixtures.create_fixtures('test/fixtures', File.basename(fixture_file, '.*'))
  end
end
